import 'package:get/get.dart';

class FreeGiftsLogic extends GetxController {
  List zeroAndDiscountList = [];
  @override
  void onReady() {
    // TODO: implement onReady
    super.onReady();
    //接收shopping页面传入的参数
    final Map<String, dynamic> params = Get.arguments;
    zeroAndDiscountList = params['zeroAndDiscountList'] ?? [];
    //去掉price为0的
    zeroAndDiscountList = zeroAndDiscountList.where((element) => element['mallProduct']['price'] != 0 || element['mallProduct']['price'] != 0.0).toList();
    update();
  }

  @override
  void onClose() {
    // TODO: implement onClose
    super.onClose();
  }
}
